<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_2817347_mh9aj0h1dfb.css">
    <script src="/lib/layui/layui.all.js"></script>

    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="/css/advpos.css">
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
</head>
<style>

</style>

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a>
                <cite>导航元素</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
    </div>

    <div class="layui-card">

        <div class="layui-card">
            <div class="layui-card-body">
                <!-- 表单区域 -->
                <form class="layui-form" id="form-search">
                    <!-- 隐藏域，保存 Id 的值 -->
                    <!-- <input type="hidden" name="id"> -->
                    <div class="layui-form-item">
                        <label class="layui-form-label">广告名称</label>
                        <div class="layui-input-inline ydd-iuptag">
                            <input style="width: 165px;" type="text" lay-verify="required" placeholder="请输入广告名称" autocomplete="off" class="layui-input" id="ipt_adv_name">
                            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo" id="search_btn_advname"><span class="iconfont icon-search iconft"></span>
                                查询</button>
                            <div class="layui-form-item layui-inline">
                                <button type="reset" class="layui-btn layui-btn-primary" id="btn-reset"> <span
                                        class="iconfont icon-refresh iconft"></span>重置</button>
                            </div>
                        </div>
                    </div>
                </form>
                <!-- 按钮区域 -->
                <div class="action-box">
                    <div class="btn-left">
                        <button type="button" class="layui-btn layui-btn-sm btn-add" id="btn-add"> <span
                                class="iconfont icon-tianjia"></span> 新增</button>
                        <button type="button" class="layui-btn layui-btn-sm btn-derive" id="btn-derive">
                            <span class="iconfont icon-icon_detail_download"></span> 导出</button>
                    </div>
                    <!-- <div class="data-v">
                        <button type="button" class="is-pain" id="btn-upoverturn"><span
                class="iconfont icon-shouqi icon-pain"></span></button>
                        <button type="button" class="is-pain" id="btn-btoverturn"><span
                class="iconfont icon-zhankai1 icon-pain"></span></button>
                        <button type="reset" class="is-pain is-circle" id="btn-refresh"><span
                class="iconfont icon-refresh icon-pain"></span></button>
                        <button type="button" class="is-pain"><span class="iconfont icon-Microsoft icon-pain"></span></button>
                    </div> -->
                </div>
                <!-- 表格区域 -->
                <table class="layui-table">
                    <colgroup>
                        <col>
                        <col width="523">
                        <col width="523">
                        <col width="523">
                    </colgroup>
                    <thead>
                        <tr>
                            <th>#</th>
                            <th id="tab-id">广告位名称</th>
                            <th id="tab-name">广告位描述</th>
                            <th>广告图数量</th>
                            <th>广告位尺寸</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="dve_list">

                    </tbody>
                </table>
                <!-- 分页区域 -->
                <div id="page_box" style="text-align: right;"></div>

            </div>

        </div>
    </div>
</body>

<script type="text/html" id="adv_list_tpl">
    {{each data}}
    <tr>
        <td>{{$index+1}}</td>
        <td>{{$value.advposname}}</td>
        <td>{{$value.advposdesc}}</td>
        <td>{{$value.advposnum}}</td>
        <td>{{$value.advpossize}}</td>
        <td class="operation">
            <button type="button" class="is-paing is-paing-blue btn-edit" data-id="{{$value.id}}"><span class="iconfont icon-icon-18 icon-paing"></span></button>
            <button type="button" class="is-paing is-paing-red btn-delete" data-id="{{$value.id}}"><span
                      class="iconfont icon-icon-16 icon-paing"></span></button>
        </td>
    </tr>
    {{/each}}
</script>


<!-- 添加的弹出层 -->
<script type="text/html" id="adv_add">
    <div class="box">
        <form class="layui-form" id='add' lay-filter="add_adv_form" id="edit_article_form">
            <!--隐藏域获取id -->
            <input type="hidden" name="id">

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位名称</label>
                <div class="layui-input-block">
                    <input type="text" name="advposname" required lay-verify="required" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位描述
              </label>
                <textarea name="advposdesc"></textarea>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位尺寸</label>
                <div class="layui-input-block">
                    <input type="text" name="advpossize" id="class_alias" required lay-verify="required" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" id="add_ok" lay-submit lay-filter="formDemo">确认新增</button>
                </div>
            </div>

        </form>
    </div>
</script>


<!-- 修改的弹出层 -->
<script type="text/html" id="adv_edit">
    <div class="box">
        <form class="layui-form" id='edit' lay-filter="edit_adv_form" id="edit_article_form">
            <!--隐藏域获取id -->
            <input type="hidden" name="id">

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位名称</label>
                <div class="layui-input-block">
                    <input type="text" name="advposname" required lay-verify="required" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位描述
                </label>
                <textarea name="advposdesc">
                </textarea>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 94px">广告位尺寸</label>
                <div class="layui-input-block">
                    <input type="text" name="advpossize" id="class_alias" required lay-verify="required" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" id="edit_ok" lay-submit lay-filter="formDemo">确认修改</button>
                </div>
            </div>

        </form>
    </div>
</script>




<script type="text/html" id="tpl-cate">
    <option value="">请选择分类</option>
    {{each data}}
    <option value="{{$value.id}}">{{$value.cate_name}}</option>
    {{/each}}
</script>
<script src="/lib/layui/layui.all.js"></script>
<script src="/js/template-web.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/js/baseAPI.js"></script>
<script src="/js/advpos.js"></script>

</html>